//
//  MyPostRequest.h
//  PostDemo1
//
//  Created by  江志磊 on 15-1-29.
//  Copyright (c) 2015年  江 志磊. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef  void (^DownloadFinishedBlock)(NSData *downloadData);
typedef void (^DownloadFailedBlock)(NSString *erroMsg);
//利用NSURLConnection+block封装post请求
@interface MyPostRequest : NSObject<NSURLConnectionDataDelegate>
//实现post请求的方法
/*parms:
 *请求地址
 *带有请求参数的字典
 *请求体参数的拼接方式(Content-Type)
 *请求的方式(GET/POST)
 */
- (void)requestWithUrlString:(NSString *)urlString parms:(NSDictionary *)dic contentType:(NSString *)type requestMethod:(NSString *)method finishedBlock:(DownloadFinishedBlock)finished failedBlock:(DownloadFailedBlock)failed;








@end
